<?php
/**
 * Created by PhpStorm.
 * User: syskey
 * Date: 2018/9/6
 * Time: 11:52
 */

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Common\SystemCotroller;
use App\Http\Controllers\Controller;
use App\Larqq;
use App\Link;

class IndexController extends Controller
{
    private $link;
    private $qq;
    private $sys;

    public function __construct()
    {
        $this->link = new Link();
        $this->qq = new Larqq();
        $this->sys = new SystemCotroller();
    }

    public function Index()
    {

        return view('admin.index');
    }

    public function BaseInfo()
    {
        $systeminfo = $this->sys->getMem();
        return view('admin.baseinfo',['sysinfo'=>$systeminfo]);
    }

    public function WebSetView()
    {
        return view('admin.webset');
    }

    public function WebCache()
    {
        return view('admin.webcache');
    }

    public function EditLink($id)
    {
        $linkinfo = $this->link->find($id);
        return view('admin.editlink', ['link' => $linkinfo]);
    }

    public function EditQq($id)
    {
        $qqinfo = $this->qq->find($id);
        return view('admin.editqq', ['qq' => $qqinfo]);
    }


}